import { defineStore } from 'pinia'
import { ref } from 'vue'
export const UserStore = defineStore('user', () => {
  const info = uni.getStorageSync("user_info") ? JSON.parse(uni.getStorageSync("user_info")) : {}
  const userInfo = ref(info)
  const setUserInfo = (data) => {
    userInfo.value = data
  }
  return {
    userInfo,
    setUserInfo
  }
})